package org.example.microservice.basedata.controller;

import org.example.microservice.basedata.model.dto.VehicleDto;
import org.example.microservice.basedata.service.VehicleService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/vehicle")
public class VehicleController {

    @Resource
    private VehicleService vehicleService;

    @GetMapping("/{id}")
    @ResponseBody
    public VehicleDto getVehicleInfo(@PathVariable Long id) {
        return vehicleService.getVehicleInfo(id);
    }
}
